package oop6;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class LogTest {
    //引用log4j,slf4j
    public static final Logger Log= LoggerFactory.getLogger(LogTest.class);
    public static void main(String[] args) {
        //一般，debug判断一下级别
        if(Log.isDebugEnabled())
            Log.debug("开始计算除法了");
        Scanner in=new Scanner(System.in);
        System.out.println("input a, b");
        try {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = a / b;
            Log.info("商是" + c);
        }catch (Exception e){
            Log.error("出问题了",e);
        }
    }
}
